ce19f3866183ff6a8dd4a4761895f0feae6ab6f6,xml/impl/src/com/intellij/codeInsight/completion/XmlAttributeInsertHandler.java,XmlAttributeInsertHandler,handleInsert,#InsertionContext#LookupElement#,53
Before Change
final XmlNamespaceHelper helper = XmlNamespaceHelper.getHelper(context.getFile());
if (helper != null) {
PsiDocumentManager.getInstance(context.getProject()).commitDocument(document);
helper.insertNamespaceDeclaration((XmlFile)file, editor, Collections.singleton(myNamespaceToInsert),
myNamespacePrefixToInsert, null);
}
After Change
if (tag != null) {
String prefix = ExtendedTagInsertHandler.suggestPrefix((XmlFile)file, myNamespaceToInsert);
if (prefix != null) {
prefix = makePrefixUnique(prefix, tag);
final XmlNamespaceHelper helper = XmlNamespaceHelper.getHelper(context.getFile());
if (helper != null) {
final Project project = context.getProject();
PsiDocumentManager.getInstance(project).commitDocument(document);
qualifyWithPrefix(prefix, element);
helper.insertNamespaceDeclaration((XmlFile)file, editor, Collections.singleton(
myNamespaceToInsert), prefix, null);